package com.jkm.rwseparate;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created by shitou on 17/4/9.
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    @Override
    protected Object determineCurrentLookupKey() {
        String dataSouceKey = DynamicDataSourceHolder.getDataSouce();
        return dataSouceKey;
    }
}
